unit ExperimentStruct;

interface

type
TExperimentData = array of double;

TExperiment = class
 constructor Create(
                    const method: string;
                    const mean: double;
                    const variance: double;
                    const expData: array of integer;
                    const valuesCount: integer;
                    const norm: double
                    );
 destructor Destroy;
public
 method_: string;
 mean_: double;
 variance_: double;
 maxValue_: double;//reserved
 expData_: TExperimentData;

end;

TExperimentRecord = class
 id_: integer;
 a_: double;
 valuesCount_: int64;
 experimentCount_: int64;
 rightValue_: double;
 thMean_: double;
 thVariance_: double;
 neumanExp_: TExperiment;
 inverseExp_: TExperiment;
 constructor Create(
                    const id: integer;
                    const a: double;
                    const valuesCount: int64;
                    const experimentCount: int64;
                    const rightValue: double;
                    const thMean: double;
                    const thVariance: double;
                    neumanExp: TExperiment;
                    inverseExp: TExperiment
                    );
end;

implementation

constructor TExperiment.Create(const method : string;const mean, variance: double; const expData: array of integer;
                               const valuesCount: integer;const norm: double);
var i: integer;
begin
 self.method_:= method;
 SetLength(self.expData_, valuesCount);
 self.mean_ := mean;
 self.variance_ := variance;
 for i:= 0 to valuesCount - 1 do
  self.expData_[i]:= expData[i]*norm;
end;

destructor TExperiment.Destroy;
begin
 SetLength(self.expData_, 0);
 inherited;
end;

{ TExperimentRecord }

constructor TExperimentRecord.Create(const id: integer; const a: double;
  const valuesCount, experimentCount: int64; const rightValue, thMean,
  thVariance: double; neumanExp, inverseExp: TExperiment);
begin
 self.id_:= id;
 self.a_:= a;
 self.valuesCount_:= valuesCount;
 self.experimentCount_:= experimentCount;
 self.rightValue_:= rightValue;
 self.thMean_:= thMean;
 self.thVariance_:= thVariance;
 self.neumanExp_:= neumanExp;
 self.inverseExp_:= inverseExp;
end;

end.

